# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Eivind Uggedal <eu@eju.no>
# Maintainer:
pkgname=tarsnap
pkgver=1.0.40
pkgrel=0
pkgdesc="Online backups for the truly paranoid"
url="https://www.tarsnap.com/"
arch="x86_64 x86 ppc64le aarch64"
license="custom"
makedepends="e2fsprogs-dev zlib-dev openssl1.1-compat-dev"
subpackages="$pkgname-doc"
source="https://www.tarsnap.com/download/tarsnap-autoconf-$pkgver.tgz"
builddir="$srcdir"/$pkgname-autoconf-$pkgver

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc/$pkgname \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

sha512sums="
a4910c5cbea4a71218638703ba3140e5536a2c9bb7f35007115a7ae4a87fcd07b1be91d88e49240ee8db39be326bac049c0893c1406f215123d55a13b7b57941  tarsnap-autoconf-1.0.40.tgz
"
